import request from '@/config/axios'

// 充值套餐 VO
export interface PointRechargePackageVO {
  id: number // 编号
  name: string // 套餐名
  payPrice: number // 支付金额
  bonusPrice: number // 赠送金额
  status: number // 状态
}

// 充值套餐 API
export const PointRechargePackageApi = {
  // 查询充值套餐分页
  getPointRechargePackagePage: async (params: any) => {
    return await request.get({ url: `/pay/point-recharge-package/page`, params })
  },

  // 查询充值套餐详情
  getPointRechargePackage: async (id: number) => {
    return await request.get({ url: `/pay/point-recharge-package/get?id=` + id })
  },

  // 新增充值套餐
  createPointRechargePackage: async (data: PointRechargePackageVO) => {
    return await request.post({ url: `/pay/point-recharge-package/create`, data })
  },

  // 修改充值套餐
  updatePointRechargePackage: async (data: PointRechargePackageVO) => {
    return await request.put({ url: `/pay/point-recharge-package/update`, data })
  },

  // 删除充值套餐
  deletePointRechargePackage: async (id: number) => {
    return await request.delete({ url: `/pay/point-recharge-package/delete?id=` + id })
  },

  // 导出充值套餐 Excel
  exportPointRechargePackage: async (params) => {
    return await request.download({ url: `/pay/point-recharge-package/export-excel`, params })
  },
}